home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / text1 / cms_help_files / strut.helpmark < prev    next >
Text File  |  1991-10-23  |  4KB  |  83 lines

  1. +-----------------------------------------------------------------------------+
  2. |                                    strut                                    |
  3. +-----------------------------------------------------------------------------+
  4.  
  5. Abbreviation:  π|noneπ%
  6.  
  7. Parameters:    π|noneπ%
  8.  
  9.     π|Description:π%
  10. There are  times when it is  necessary to have the  baselineskip between two
  11. lines be the  same, especially if  you are building a  table that uses rules
  12. between columns.   The \strut markup  can be used in  an \halign to maintain
  13. consistent distance  between lines  of a table.    The \strut markup  has no
  14. parameters.   Its height is  1.8 times the  height of an "x"  in the current
  15. point size.  Its depth is .6 times the height of an "x" in the current point
  16. size.
  17.  
  18.     π|Example:π%
  19. Consider this table created without the use of \strut,
  20.  
  21. \sfs{cm8}{eightpt}{default}
  22.  
  23. \twelvept
  24.  
  25.  
  26. \tabletitle{Comparison of the composition of goat's
  27. milk and that of two common breeds of dairy cows}
  28. {\offinterlineskip\eightpt
  29. \halign{\vrule\hs{3pt}\lft{#}\hs{3pt}\vrule&&
  30.     \hs{3pt}\ctr{#}\hs{3pt}\vrule\cr
  31. \noalign{\hrule}
  32. &&\bd Total&&&\cr
  33. \bd Source of milk&\bd Water&\bd Solids&
  34.      \bd Fat&\bd Protein&\bd Lactose\cr
  35. \noalign{\hrule height 1pt}
  36. Goats&82.02\%&11.98\%&3.50\%&3.13\%&4.55\%\cr
  37. \noalign{\hrule}
  38. Holstein-Friesian&87.50\%&12.50\%&3.55\%&3.42\%&4.86\%\cr
  39. \noalign{\hrule}
  40. Jersey&85.31\%&14.69\%&5.18\%&3.86\%&4.94\%\cr
  41. \noalign{\hrule}
  42.  
  43. }}
  44. \twelvept
  45.  
  46. which prints as:
  47. +-----------------------------------------------------------------------------+
  48. |                                                                             |
  49. |                                   Table 1                                   |
  50. | Comparison of the composition of goat's milk and that of two common breeds  |
  51. | of dairy cows                                                               |
  52. | ......................................................                      |
  53. | .......................................................                     |
  54. | .......................................................                     |
  55. | .Jersey...........85.31%..14.69%5.18%..3.86%...4.94%...                     |
  56. | ......................................................                      |
  57. +-----------------------------------------------------------------------------+
  58.  
  59. Now add \strut to the \halign preamble,
  60.  
  61. \halign{\strut\vrule\hs{3pt}\lft{#}\hs{3pt}\vrule&&
  62.      \hs{3pt}\ctr{#}\hs{3pt}\vrule\cr
  63.  
  64. and notice the uniform distance between lines:
  65. +-----------------------------------------------------------------------------+
  66. |                                                                             |
  67. |                                   Table 2                                   |
  68. | Comparison of the composition of goat's milk and that of two common breeds  |
  69. | of dairy cows                                                               |
  70. | ......................................................                      |
  71. | .                  .     Total .      .      .        .                     |
  72. | .......................................................                     |
  73. |  Goats             82.02%11.98% 3.50%  3.13%   4.55%                        |
  74. | ..Holstein-Friesia87.50%..12.50%3.55%..3.42%...4.86%..                      |
  75. | .......................................................                     |
  76. | .......................................................                     |
  77. +-----------------------------------------------------------------------------+
  78.  
  79.     π|Notes:π%
  80. The size of the strut changes as the interline skip changes.  \twelvept will
  81. have a longer \strut than will \tenpt.
  82.     See The TEXbook for more on \offinterlineskip.
  83.